//
//  DeliveryPartsDetailHeaderView.m
//  FactorySale
//
//  Created by 主事丫环HU on 2020/7/31.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "DeliveryPartsDetailHeaderView.h"
@interface DeliveryPartsDetailHeaderView()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;
@property (weak, nonatomic) IBOutlet UITextView *addressTextView;
@property (weak, nonatomic) IBOutlet UILabel *companyNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *orderNumberLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *totalMoneyLabel;

@property (weak, nonatomic) IBOutlet UIView *logisticsInfoBgView;


@end
@implementation DeliveryPartsDetailHeaderView

- (void)setModel:(UnpaidOrHistoryOrderInfoDetailModel *)model{
    [self.addressTextView setEditable:NO];
    self.nameLabel.text = model.factoryUserName;
    self.phoneLabel.text = model.factoryUserPhone;
    self.addressTextView.text = model.factoryUserAddress;
    self.companyNameLabel.text = model.logistics_name;
    self.orderNumberLabel.text = model.logistics_num;
    self.timeLabel.text = [NSString stringWithFormat:@"下单时间：%@",model.create_time];
    self.totalMoneyLabel.text = [NSString stringWithFormat:@"¥%@",model.total_amount];
    if ([model.logistics_name isEqualToString:@""]) {
        self.logisticsInfoBgView.hidden = YES;
    } else {
        self.logisticsInfoBgView.hidden = NO;
    }
}

@end
